package com.ruoyi.stock.service.impl;

import com.ruoyi.stock.domain.StockTradeDate;
import com.ruoyi.stock.mapper.StockTradeDateMapper;
import com.ruoyi.stock.service.IStockTradeDateService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 股票交易日历信息Service业务层处理
 *
 * @author ruoyi
 * @date 2021-11-02
 */
@Service
public class StockTradeDateServiceImpl implements IStockTradeDateService {
  @Autowired private StockTradeDateMapper stockTradeDateMapper;

  /**
   * 查询股票交易日历信息
   *
   * @param id 股票交易日历信息主键
   * @return 股票交易日历信息
   */
  @Override
  public StockTradeDate selectStockTradeDateById(Long id) {
    return stockTradeDateMapper.selectStockTradeDateById(id);
  }

  /**
   * 查询股票交易日历信息列表
   *
   * @param stockTradeDate 股票交易日历信息
   * @return 股票交易日历信息
   */
  @Override
  public List<StockTradeDate> selectStockTradeDateList(StockTradeDate stockTradeDate) {
    return stockTradeDateMapper.selectStockTradeDateList(stockTradeDate);
  }

  /**
   * 新增股票交易日历信息
   *
   * @param stockTradeDate 股票交易日历信息
   * @return 结果
   */
  @Override
  public int insertStockTradeDate(StockTradeDate stockTradeDate) {
    return stockTradeDateMapper.insertStockTradeDate(stockTradeDate);
  }

  @Override
  public int insertBatch(List<StockTradeDate> list) {
    return stockTradeDateMapper.insertBatch(list);
  }

  /**
   * 修改股票交易日历信息
   *
   * @param stockTradeDate 股票交易日历信息
   * @return 结果
   */
  @Override
  public int updateStockTradeDate(StockTradeDate stockTradeDate) {
    return stockTradeDateMapper.updateStockTradeDate(stockTradeDate);
  }

  /**
   * 批量删除股票交易日历信息
   *
   * @param ids 需要删除的股票交易日历信息主键
   * @return 结果
   */
  @Override
  public int deleteStockTradeDateByIds(Long[] ids) {
    return stockTradeDateMapper.deleteStockTradeDateByIds(ids);
  }

  /**
   * 删除股票交易日历信息信息
   *
   * @param id 股票交易日历信息主键
   * @return 结果
   */
  @Override
  public int deleteStockTradeDateById(Long id) {
    return stockTradeDateMapper.deleteStockTradeDateById(id);
  }
}
